#Include "PROTHEUS.CH"
#DEFINE K_CTRL_E 5 // Ctrl + E

User Function AfterLogin()
	
	SetKey( K_CTRL_E , { || U_Execute() } )
	
Return

//------------------------------------------------------------

User Function Execute()
	
	Local	oDlg	:=	Nil
	Local	oButton	:=	Nil
	Local	oButton	:=	Nil
	Local	oGet	:=	Nil
	Local	cGet	:=	Space(50)
	
	DEFINE MSDIALOG oDlg TITLE 'Execute' FROM 000, 000  TO 100, 500 COLORS 0, 16777215 PIXEL
	
	@ 005, 005 MSGET oGet VAR cGet SIZE 240, 010 OF oDlg COLORS 0, 16777215 PIXEL
	@ 025, 158 BUTTON oButton PROMPT 'Execute'	SIZE 037, 012 OF oDlg ACTION Eval( & ( '{||' + cGet + '}' ) )PIXEL
	@ 025, 197 BUTTON oButton PROMPT 'Sair'		SIZE 037, 012 OF oDlg ACTION oDlg:End() PIXEL
	
	ACTIVATE MSDIALOG oDlg CENTERED
	
Return
